#include <iostream>
#include <algorithm>
using namespace std;
constexpr int MAXN = 105;
int n, k, a[MAXN], m[MAXN];
void solve();
int main() {
    cin >> n;
    for (int i = 0; i < n; i++) 
        cin >> a[i];
    for (int i = 0; i < n; i++)
        cin >> m[i];
    cin >> k;
    solve();
}

int dp[MAXN][MAXN];
// dp[m + 1][n] = 从前m种是否可以求和到n
void solve() {
    for (int i = 0; i < n; i++) {
        for (int j = 0; i <= k; j++)
            for (int k = 0; k < m[i] && j >= k * a[i]; k++)
                dp[i + 1][j] |= dp[i][j - k * a[i]];
    }
    if (dp[n][k]) cout << "Yes" << endl;
    else cout << "No";
}